<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?=config_item('my_title')?></title>
    <base href="<?=base_url()?>">
    <link rel="stylesheet" href="plugin/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
<?php require_once(VIEWPATH.'include/header.html');?>
<!-- 主内容区域 -->
<div class="container-fluid iframe-container">
    <?php require_once(VIEWPATH.'include/sidebar.html');?>
    <!-- 主面板 -->
    <div class="iframe-main">
        <div class="iframe-main-section">
            <div class="section_container">
                <div class="panel">
                    <div class="panel-heading">
                        <div class="panel-title"><?=$section_name.go_back()?></div>
                    </div>
                    <form class="form-horizontal ajax-form-hook" action="<?=$save_url?>" method="post">
                        <div class="panel-body">
                            <input type="hidden" name="id" value="<?=$record['id']?>">
                            <div class="form-group">
                                <div class="col-xs-2 control-label">角色</div>
                                <div class="col-xs-3">
                                    <?=$sys_role?>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label"><i class="required"></i>用户名</div>
                                <div class="col-xs-3">
                                    <input type="text" name="username" value="<?=$record['username']?>"
                                           class="form-control"
                                           datatype="*"
                                           ajaxurl="<?=$check_username_url.'?id='.$record['id']?>">
                                </div>
                                <div class="col-xs-4 form-control-static msg-hook"></div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label">密码</div>
                                <div class="col-xs-3">
                                    <input type="password" name="password" class="form-control" datatype="*6-20"
                                           ignore="ignore">
                                    <span class="help-block">不填写则不修改</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label">真实姓名</div>
                                <div class="col-xs-3">
                                    <input type="text" name="realname" value="<?=$record['realname']?>"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label">状态</div>
                                <div class="col-xs-3 radio">
                                    <?=$dict['status']?>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label">备注</div>
                                <div class="col-xs-5">
                                    <textarea name="remark" class="form-control"
                                              rows="3"><?=$record['remark']?></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-offset-2 col-xs-8">
                                    <button type="submit" name="submit_type" value="1"
                                            class="btn btn-primary submit-hook">
                                        保存
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="plugin/require.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript">
    require(['unit'], function (unit) {
        unit.ajaxForm({
            tiptype: 3
        });
    });
</script>
</body>
</html>